package com.cjc.demo1;

public class Computer {
    private String cpu;
    private  String memory;
    public String name;
    String Brand;

    public Computer(String cpu, String memory, String name,String Brand) {
        this.cpu = cpu;
        this.memory = memory;
        this.name = name;
        this.Brand = Brand;
    }

    public Computer() {
    }

    public String getCpu() {
        return cpu;
    }

    public void setCpu(String cpu) {
        this.cpu = cpu;
    }

    public String getMemory() {
        return memory;
    }

    public void setMemory(String memory) {
        this.memory = memory;
    }

    public void open() {
        System.out.println(this.name+"正在开机");
    }
    public void close() {
        System.out.println(this.name+"正在关机");
    }

    public static void main(String[] args) {
        Computer computer = new Computer("i7","16G","user","联想");
        computer.cpu = "i7";
    }
}
